using System;
using System.Collections.Generic;
using System.Text;
using BusinessObjects.BO_Actions;
using Entity.StoreProcedure;
using BusinessObjects;
using System.Data;
namespace BusinessObjects.BO_GetObjects {
	public static class BO_about_us {
		public static DataTable SelectAll(int status) {
			try {
				usp_about_us_select_all entity = new usp_about_us_select_all();
				entity.STATUS = status;
				return BO_Actions<usp_about_us_select_all>.ExecuteAndReturnDataTable(entity);
			} catch (Exception ex) {
				throw ex;
			}
		}
		public static DataTable SelectTop(int rows, int status) {
			try {
				usp_about_us_select_top entity = new usp_about_us_select_top();
				entity.NUMBERRECORD = rows;
				entity.STATUS = status;
				return BO_Actions<usp_about_us_select_top>.ExecuteAndReturnDataTable(entity);
			} catch (Exception ex) {
				throw ex;
			}
		}
		public static DataTable Search(int about_id) {
			try {
				usp_about_us_search entity = new usp_about_us_search();
				entity.ABOUT_ID = about_id;

				return BO_Actions<usp_about_us_search>.ExecuteAndReturnDataTable(entity);
			} catch (Exception ex) {
				throw ex;
			}
		}
		public static DataTable SelectWithPaged(int startIndex, int pageCount, int status) {
			try {
				usp_about_us_select_paged entity = new usp_about_us_select_paged ();
				entity.STARTINDEX = startIndex;
				entity.MAXRECORDS = pageCount;
				entity.STATUS = status;
				return BO_Actions<usp_about_us_select_paged>.ExecuteAndReturnDataTable(entity);
			} catch (Exception ex) {
				throw ex;
			}
		}
        //public static string Insert( string sort_name, string full_name, string birth_day, string birth_place, string email, string phone_number, string thumb_img, string about_detail, string about_detail_eng, int order_display, DateTime created_date, string created_by, DateTime modify_date, string modify_by, int status) {
        //    try {
        //        usp_about_us_insert entity = new usp_about_us_insert();
        //        entity.SORT_NAME = sort_name;
        //        entity.FULL_NAME = full_name;
        //        entity.BIRTH_DAY = birth_day;
        //        entity.BIRTH_PLACE = birth_place;
        //        entity.EMAIL = email;
        //        entity.PHONE_NUMBER = phone_number;
        //        entity.THUMB_IMG = thumb_img;
        //        entity.ABOUT_DETAIL = about_detail;
        //        entity.ABOUT_DETAIL_ENG = about_detail_eng;
        //        entity.ORDER_DISPLAY = order_display;
        //        entity.CREATED_DATE = created_date;
        //        entity.CREATED_BY = created_by;
        //        entity.MODIFY_DATE = modify_date;
        //        entity.MODIFY_BY = modify_by;
        //        entity.STATUS = status;

        //        return BO_Actions<usp_about_us_insert>.ExecuteAndReturnStringValue(entity);
        //    } catch (Exception ex) {
        //        throw ex;
        //    }
        //}
        //public static string Update( int about_id, string sort_name, string full_name, string birth_day, string birth_place, string email, string phone_number, string thumb_img, string about_detail, string about_detail_eng, int order_display, DateTime created_date, string created_by, DateTime modify_date, string modify_by, int status) {
        //    try {
        //        usp_about_us_update entity = new usp_about_us_update();
        //        entity.ABOUT_ID = about_id;
        //        entity.SORT_NAME = sort_name;
        //        entity.FULL_NAME = full_name;
        //        entity.BIRTH_DAY = birth_day;
        //        entity.BIRTH_PLACE = birth_place;
        //        entity.EMAIL = email;
        //        entity.PHONE_NUMBER = phone_number;
        //        entity.THUMB_IMG = thumb_img;
        //        entity.ABOUT_DETAIL = about_detail;
        //        entity.ABOUT_DETAIL_ENG = about_detail_eng;
        //        entity.ORDER_DISPLAY = order_display;
        //        entity.CREATED_DATE = created_date;
        //        entity.CREATED_BY = created_by;
        //        entity.MODIFY_DATE = modify_date;
        //        entity.MODIFY_BY = modify_by;
        //        entity.STATUS = status;

        //        return BO_Actions<usp_about_us_update>.ExecuteAndReturnStringValue(entity);
        //    } catch (Exception ex) {
        //        throw ex;
        //    }
        //}
		public static bool Delete(string ids, string spliter, int delete_type) {
			try {
				usp_about_us_delete entity = new usp_about_us_delete();
				entity.IDS = ids;
				entity.SPLITER = spliter;
				entity.DELETE_TYPE = delete_type;

				return BO_Actions<usp_about_us_delete>.ExecuteAndReturnBooleanValue(entity);
			} catch (Exception ex) {
				throw ex;
			}
		}
		public static bool Restore(int about_id) {
			try {
				usp_about_us_restore entity = new usp_about_us_restore();
				entity.ABOUT_ID = about_id;

				return BO_Actions<usp_about_us_restore>.ExecuteAndReturnBooleanValue(entity);
			} catch (Exception ex) {
				throw ex;
			}
		}
	}
}

